<?php get_header(); ?>
  <!-- Container -->
  <div id="content">
    <!-- Start Postwrap -->
    <div class="postwrap">
      <?php if (have_posts()) : ?>
      <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
      <?php /* If this is a category archive */ if (is_category()) { ?>
      <h2 class="pagetitle">Archive for the &#8216;
        <?php single_cat_title(); ?>
        &#8217; Category</h2>
      <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
      <h2 class="pagetitle">Archive for
        <?php the_time('F jS, Y'); ?>
      </h2>
      <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
      <h2 class="pagetitle">Archive for
        <?php the_time('F, Y'); ?>
      </h2>
      <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
      <h2 class="pagetitle">Archive for
        <?php the_time('Y'); ?>
      </h2>
      <?php /* If this is an author archive */ } elseif (is_author()) { ?>
      <h2 class="pagetitle">Author Archive</h2>
      <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
        <h2 class="pagetitle">Blog Archives</h2>
        <?php } ?>
      <?php while (have_posts()) : the_post(); ?>
      <div class="Post" id="post-<?php the_ID(); ?>" style="padding-bottom: 40px;">
        <div class="posthead">
          <h1><a title="Permanent Link to <?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark">
            <?php the_title(); ?>
            </a></h1>
          <small class="postauthor">Author:
          <?php the_author() ?>
          <?php edit_post_link('Edit'); ?>
          </small>
          <p class="postdate"> <small class="month">
            <?php the_time('M') ?>
            </small> <small class="day">
            <?php the_time('j') ?>
            </small> </p>
        </div>
        <div class="postcontent">
          <?php the_content('Read the rest of this entry'); ?>
        </div>
        <div class="clearer"></div>
        <div class="postinfo">
          <li class="postcomments">
            <?php comments_popup_link('0 Comments', '1 Comment', '% Comments'); ?>
          </li>
          <li class="postcat">Filed under:
            <?php the_category(', ') ?>
          </li>
          <div class="clearer"></div>
        </div>
      </div>
      <?php endwhile; ?>
      <div class="Nav">
        <?php if(function_exists('wp_pagenavi')) { wp_pagenavi();} else { posts_nav_link(' &#8212; ', __('&laquo; Go Back'), __('View more posts &raquo;'));} ?>
      </div>
      <?php else : ?>
      <h2>Not Found</h2>
      <?php endif; ?>
    </div>
    <!-- End Postwrap -->
    <?php get_sidebar(); ?>
    <!-- Container -->
  </div>
  <?php get_footer(); ?>
